package com.ftg.learn.chapter12;

import java.util.List;
import java.util.Stack;
import java.util.concurrent.ConcurrentHashMap;

/**
 * 学习一下java原带的stack
 *
 * @author kangjx
 * @version 1.0
 * @date 2023/2/10 上午8:50
 */
public class LearnStack {

    public static void main(String[] args) {
        Stack<Integer> stack = new Stack<>();
        stack.push(2);
        stack.push(3);
        stack.push(4);
        stack.push(5);
        stack.add(23);
//        stack.peek();
//        //....cpu push() pop()
//        stack.peek();

        System.out.println(stack.search(23));
//        System.out.println(stack.size());
        List<Integer> list = new Stack<>();
    }

}
